From: | Allan Odgaard |
Date: | 15 Aug 99 at 20:09:10 |
Subject: | Re: Font sizes. |
From: Allan Odgaard <Duff@DIKU.DK>
On 15-Aug-99, Lee Atkins wrote:
> Is there a way of getting the size of a font Text() will use before opening
> a window?
Yes, TextLength() from graphics.library. You could use it like this:
struct RastPort rport;
InitRastPort(&rport);
SetFont(&rport, default_font);
ULONG len = TextLength(&rport, str, strlen(str));
Regards Allan